<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.io.*,java.util.*, javax.servlet.*"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP获取当前时间示例</title>
</head>
<body>
	<div style="margin: auto; width: 80%">
		<center>
			<h1>显示当前日期和时间</h1>
		</center>
		<%
			Date date = new Date();
			out.print("<h2 align = \"center\">" + date.toString() + "</h2>");
		%>
	</div>
</body>
</html>